﻿<Page
	x:Class="Coding4Fun.Maelstrom.Tablet.Controller"
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:local="using:Coding4Fun.Maelstrom.Tablet"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	mc:Ignorable="d">
	<Page.Resources>
		<Storyboard x:Name="LeaveWaiting">
			<DoubleAnimation Duration="0:0:0.5" BeginTime="0:0:00.5" To="0" Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationX)" Storyboard.TargetName="playingField" d:IsOptimized="True">
				<DoubleAnimation.EasingFunction>
					<ExponentialEase/>
				</DoubleAnimation.EasingFunction>
			</DoubleAnimation>
			<DoubleAnimation Duration="0:0:0.5" To="1.0"  BeginTime="0:0:0.5" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="playingField" d:IsOptimized="True"/>

			<DoubleAnimation Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleX)" Duration="0:0:1.0"  BeginTime="0:0:0.0" To=".85" Storyboard.TargetName="titles">
				<DoubleAnimation.EasingFunction>
					<ExponentialEase/>
				</DoubleAnimation.EasingFunction>
			</DoubleAnimation>
			<DoubleAnimation Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleY)" Duration="0:0:1.0"  BeginTime="0:0:0.0" To=".85" Storyboard.TargetName="titles">
				<DoubleAnimation.EasingFunction>
					<ExponentialEase/>
				</DoubleAnimation.EasingFunction>
			</DoubleAnimation>
			<DoubleAnimation Duration="0:0:0.5" To="0.0"  BeginTime="0:0:0.5" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="titles" d:IsOptimized="True"/>
		</Storyboard>
	</Page.Resources>
	<Viewbox>
		<Canvas x:Name="canvas_root" Width="1920" Height="1080" Background="#eaeaea">
			<Canvas x:Name="playingField" Width="1920" Height="1080" RenderTransformOrigin=".5,.5" Opacity="0.0"  PointerEntered="paddle_PointerEntered" PointerMoved="paddle_PointerMoved" PointerExited="paddle_PointerExited">
				<Canvas.Projection>
					<PlaneProjection RotationX="-90"/>
				</Canvas.Projection>
				<Image x:Name="imgGrid" Source="Images/grid.png" Width="1900" Height="1000" Canvas.Left="10" Canvas.Top="40"/>
				<local:NumberDisplay x:Name="LeftDigit1" Canvas.Left="348" Canvas.Top="303" Visibility="Collapsed"/>
				<local:NumberDisplay x:Name="LeftDigit2" Canvas.Left="552" Canvas.Top="303"/>
				<Image x:Name="Dash" Source="Images/dash.png" Canvas.Left="876" Canvas.Top="354" Opacity="0.6"/>
				<local:NumberDisplay x:Name="RightDigit1" Canvas.Left="1198" Canvas.Top="303"/>
				<local:NumberDisplay x:Name="RightDigit2" Canvas.Left="1402" Canvas.Top="303" Visibility="Collapsed"/>
				<local:Paddle x:Name="paddle" Canvas.Left="960" Canvas.Top="540" />
			</Canvas>
			<Canvas x:Name="titles" Canvas.Left="0" Canvas.Top="0" Width="1920" Height="1080" RenderTransformOrigin=".5,.5" IsHitTestVisible="False">
				<Canvas.RenderTransform>
					<CompositeTransform ScaleX="1" ScaleY="1"/>
				</Canvas.RenderTransform>
				<Image x:Name="imgCircle" Width="292" Height="292" Source="Images/circle.png" Canvas.Left="814" Canvas.Top="394"/>
				<Canvas x:Name="canvas_blades" Width="1920" Height="1080" RenderTransformOrigin=".5,.5" Opacity="1"/>
				<Image x:Name="imgCircle2" Width="292" Height="292" Source="Images/circle.png" Canvas.Left="814" Canvas.Top="394" Opacity=".8" RenderTransformOrigin="0.5,0.5">
					<Image.RenderTransform>
						<ScaleTransform ScaleX=".6" ScaleY=".6"/>
					</Image.RenderTransform>
				</Image>
				<Ellipse x:Name="whiteCircle" Fill="#FFFFFF" Canvas.Left="710" Canvas.Top="290" Width="500" Height="500" Opacity=".4"/>
				<Image x:Name="imgTitle" Source="Images/title.png" Width="664" Height="177" Canvas.Left="628" Canvas.Top="452" RenderTransformOrigin="0.5,0.5">
					<Image.RenderTransform>
						<CompositeTransform ScaleX="0.6" ScaleY="0.6"/>
					</Image.RenderTransform>
				</Image>
			</Canvas>
			<Image x:Name="imgTextWaiting" Source="Images/textWaiting.png" Width="403" Height="46" Canvas.Left="766" Canvas.Top="932" Visibility="Collapsed"/>
			<Image x:Name="imgTextStart" Source="Images/textStart.png" Width="403" Height="46" Canvas.Left="766" Canvas.Top="929" Visibility="Visible"/>

			<StackPanel x:Name="AdminPanel">
				<TextBox x:Name="IpAddress" Foreground="Black"/>
				<Button Click="Connect_Click" Foreground="Black">Connect</Button>
				<TextBlock x:Name="Status" Foreground="Black">Not Connected</TextBlock>
			</StackPanel>
		</Canvas>
	</Viewbox>
</Page>